//
//  CurrentCityTableViewCell.m
//  OCUI
//
//  Created by login on 15-7-20.
//
//

#import "CurrentCityTableViewCell.h"

@implementation CurrentCityTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        
        self.currentCity = [[UIButton alloc]initWithFrame:CGRectMake(20, 5, ([UIScreen mainScreen].bounds.size.width-4*20)/3, 40)];
        self.currentCity.backgroundColor = [UIColor lightGrayColor];
        [self.currentCity.layer setCornerRadius:5];
        self.currentCity.titleLabel.textColor = [UIColor blackColor];
        [self.currentCity addTarget:self action:@selector(buttonTitle:) forControlEvents:UIControlEventTouchUpInside];
        [self.contentView addSubview:self.currentCity];
        
    }
    
    return self;
}

- (void)buttonTitle:(UIButton *)button
{
    [self.delegate currentCityButtonTitle:button.titleLabel.text];
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
